import request from '@/utils/request'

// 查询参数列表
export const listConfigApi = '/system/config/list'

// 查询参数详细
export function infoConfigApi(configId) {
  return request.get('/system/config/info', { id: configId })
}

// 根据参数键名查询参数值
export function getConfigApi(configKey) {
  return request.get('/system/config/get', { key: configKey })
}

// 新增参数配置
export function addConfigApi(data) {
  return request.post('/system/config/add', data)
}

// 修改参数配置
export function editConfigApi(data) {
  return request.post('/system/config/edit', data)
}

// 删除参数配置
export const delConfigApi = '/system/config/delete'

// 刷新参数缓存
export const refreshCacheApi = '/system/config/cache'

// 导出
export const exportConfigApi = '/system/config/export'
